﻿Public Class Template

   

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        Layer.Show()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        'Me.Validate()
        'Me.TemplateBindingSource.EndEdit()
        'Me.TableAdapterManager.UpdateAll(Me.DigitalDocumentDataSet)
        ' MsgBox("Saved")
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDel.Click
        ' Me.Validate()
        'Me.TemplateTableAdapter.Delete(Me.NameTextBox.Text, Me.CssTextBox.Text)

        ' Me.TemplateTableAdapter.Fill(Me.DigitalDocumentDataSet.Template)

        MsgBox("deleted")

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChange.Click

        ' Me.Text = ListBox1.GetItemText(NameTextBox)
        'mesa sth lista kanonika emfanizontai ta templateID p yparxoun sto layer
        ' Layer.Text = ListBox1.GetItemText(NameTextBox)

        ' NameTextBox.Focus()

        '  TemplateTableAdapter.Update(DigitalDocumentDataSet.Template)

    End Sub

 

   
    Private Sub TemplateBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TemplateBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.TemplateBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.DigitalDocumentDataSet)

    End Sub

    Private Sub Template_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'DigitalDocumentDataSet.Template' table. You can move, or remove it, as needed.
        Me.TemplateTableAdapter.Fill(Me.DigitalDocumentDataSet.Template)

    End Sub
End Class
